#ifndef TRANSFORMFEATURE_H
#define TRANSFORMFEATURE_H
/*
变换运算存储变换Id、变换类型、目标对象、变换结果Id、变换参数等
*/
#include "BaseFeature.h"
#include <RWTools.h>
class TransformFeature : public BaseFeature {
public:
	TransformFeature();
	~TransformFeature();

public:
	//获取私有变量
	int getTransformId();
	int getTransformType();
	int getResultId() override;
	BaseFeature* getTargetFeature() override;
	double getAngel();
	int getSubEdgeIndex();
	gp_Vec getTranslationVec();

	//设置私有变量
	void setTransformId(int transformId);
	void setTransformType(int transformType);
	void setResultId(int resultId);
	void setTargetFeature(BaseFeature* targetFeature);
	void setAngel(double angel);
	void setSubEdgeIndex(int index);
	void setTranslationVec(gp_Vec vec);
	void AddOperation(BaseFeature* feature) override {
		if (this->targetFeature->getFeatureType() <= 5) {
			this->targetFeature->AddOperationToList(feature);
		}
		else {
			this->targetFeature->AddOperation(feature);
		}
	};
private:
	int transformId;
	//0:rotate 1:pan 2:both
	int transformType;
	int resultId;
	double angel;
	//旋转轴
	int subEdgeIndex;
	//平移向量
	gp_Vec translationVec;
	//保存变换运算前的拓扑数据
	//判断对象是否是不规则对象（即是操作子类），若是则先重做操作获取不规则对象
	BaseFeature* targetFeature;
};
#endif

